﻿@using System.Collections.Generic
@using MrCMS.Entities.People
@using MrCMS.Settings
@model MrCMS.Entities.Multisite.Site
@{
    ViewBag.Title = "Edit | " + Model.Name;
    var settings = ViewData["Settings"] as List<SiteSettingsBase>;
}

@using (Html.BeginForm("Edit", "Sites", FormMethod.Post, new { id = "edit-site" }))
{
    <fieldset>
        <legend>
            @Model.Name
            <span class="btn-group  display-inline  pull-right">
                @Html.ActionLink("Back to list", "Index", "Sites", null, new { @class = "btn btn-default" })
                <button class="btn btn-primary">
                    @Resource("Save")
                </button>
            </span>
        </legend>
        <div class="form-group">
            @Html.HiddenFor(x => x.Id)
            @Html.LabelFor(x => x.Name)
            @Html.TextBoxFor(x => x.Name, new { @class = "form-control" })
            @Html.ValidationMessageFor(x => x.Name)
        </div>
        <div class="form-group">
            @Html.LabelFor(x => x.BaseUrl)
            @Html.TextBoxFor(x => x.BaseUrl, new { @class = "form-control" })
            @Html.ValidationMessageFor(x => x.BaseUrl)
        </div>

        @{ Html.RenderPartial("RestrictedDomains", Model); }
    </fieldset>
}